import ProxyConfig from "./proxy"
function buildProxy() {
  const proxyList = {}
  Object.keys(ProxyConfig).forEach(it => {
    proxyList[`/${it}`] = {
      target: ProxyConfig[it][process.env.API_ENV || "test"],
      changeOrigin: true,
      pathRewrite: { [`^/${it}`]: "" }
    }
  })
  return proxyList
}
export default {
  env: {
    NODE_ENV: '"development"'
  },
  defineConstants: {},
  mini: {
  },
  h5: {
    devServer: {
      open: true,
      port: 8000,
      proxy: buildProxy()
    }
  }
}
